package vno.fux.res.pool
{
	import flash.utils.Dictionary;
	import vno.fux.utils.HashSet;

	public class ResourceList
	{
		protected var _dic:Dictionary;
		public function ResourceList()
		{
			_dic = new Dictionary;
		}
		
		public function setRes(id_:uint, value_:Resource):void
		{
			_dic[id_]=value_;
		}
		
		public function getRes(id_:uint):Resource
		{
			return _dic[id_];
		}

		internal function clearByHashSet(list_:HashSet):void
		{
			for each(var id_:uint in list_)
			{
				_dic[id_].destroy();
			}
		}
		
		public function createByHashSet(list_:HashSet):void
		{
			for each(var id_:uint in list_)
			{
				_dic[id_].create();
			}
		}
	}
}